package com.snow.campuslink.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.snow.campuslink.user.converter.dto.UserLoginDto;
import com.snow.campuslink.user.converter.dto.UserRegisterDto;
import com.snow.campuslink.user.entity.User;

/**
 *  服务类
 *
 * @author Gaosl
 * @since 2021-01-20
 */
public interface IUserService extends IService<User> {

    /**
     * TODO
     *
     * @param userLoginDto
     * @author Gaosl
     * @date 2021/2/7 12:22
     * @return com.snow.campuslink.user.entity.User
     */
    User login(UserLoginDto userLoginDto);

    /**
     * TODO
     *
     * @param userRegisterDto
     * @author Gaosl
     * @date 2021/2/7 17:50
     * @return java.lang.Boolean
     */
    void register(UserRegisterDto userRegisterDto);

    /**
     * TODO
     *
     * @param userId
     * @author Gaosl
     * @date 2021/2/10 11:56
     * @return com.snow.campuslink.user.entity.User
     */
    User getUserInfoById(Long userId);

    /**
     * 通过userId得到username
     *
     * @param userId
     * @author Gaosl
     * @date 2021/2/14 13:37
     * @return java.lang.String
     */
    String getUsernameById(Long userId);

    /**
     * TODO
     *
     * @param email
     * @author Gaosl
     * @date 2021/3/12 18:20
     * @return void
     */
    void verificationCode(String email);
}
